﻿
@model ElCharro01.Models.Product

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<h2 class="centered">Gestione Prodotti->Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Product</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.Nome)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nome)
            @Html.ValidationMessageFor(model => model.Nome)
        </div>
 
        <div class="editor-label">
            @Html.LabelFor(model => model.Descrizione)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Descrizione,13,40,null)
            @Html.ValidationMessageFor(model => model.Descrizione)
        </div>

        <div class="editor-field">
            @Html.DropDownList("CategoryId", new SelectList(ViewBag.CategoryList, "Id", "Nome"))
            @Html.Label("Categoria Appartenenza")
        </div>

        <div class="editor-field">
            @Html.DropDownList("ClothingTypeId", new SelectList(ViewBag.CloghintTypeList, "ID", "Nome"))
            @Html.Label("Tipo Abbigliamento")
        </div>
        
         <div class="editor-field">
            @Html.CheckBox("intoSlideShow")
            @Html.Label("Inserisci nello slideshow")
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
